Cookie
Creates a new instance of Cookie with the given parameters.
Since
8.0.0
Parameters
A domain this cookie belongs to. Please note, the domain is also required for cookies with __Host
prefix.
The cookie name.
The cookie value.
The cookie path.
Specifies whether the cookie is restricted to a secure protocol (HTTPS or WSS), or it can be sent using any protocol.
Specifies whether the cookie is considered HTTP only.
The cookie creation time.
The cookie expiration time. If not specified, the cookie is treated as a session cookie.
The SameSite
cookie attribute value that allows declaring if this cookie should be restricted to a first-part or same-site context. By default, it is set to LAX_MODE, which means cookies are only set when the domain in the URL of the browser matches the domain of the cookie – a first-party cookie. The NONE value requires the secure parameter to be true
.